home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / CW MacMindy 1.4 / Examples / Modules / main.dyl < prev    next >
Encoding:
Text File  |  1995-11-13  |  536 b   |  25 lines  |  [TEXT/CWIE]

  1. module:                Example
  2. author:                Patrick C. Beard <beard@cs.ucdavis.edu>
  3. description:        A simple Dylan example.
  4.  
  5. // first, define the local module.
  6.  
  7. define module Example
  8.     use Dylan;                // all programs need this.
  9.     use Extensions;            // imports "main"
  10.     use Cheap-IO;            // for "print"
  11.     use Beep;                // imports "beep"
  12.     use Stack;                // imports <stack>.
  13. end module Example;
  14.  
  15. // the main entry point.
  16.  
  17. define method main (argv0, #rest args)
  18.     let s = make(<stack>);
  19.     push(s, "Me!");
  20.     push(s, "Eat!");
  21.     print(pop(s));
  22.     print(pop(s));
  23.     beep();
  24. end;
  25.